const { createProxyMiddleware} = require('http-proxy-middleware')
const devBaseURL = 'http://localhost:3000'
const proBaseURL = 'http://39.96.3.237:3000'
const BASE_URL = process.env.NODE_ENV === 'development' ? devBaseURL : proBaseURL
module.exports = function (app) {
    app.use(createProxyMiddleware('/syc_api', {
            target: BASE_URL,
            changeOrigin: true,
            pathRewrite: {
                "^/syc_api": ""
            }
    }))
    app.use(createProxyMiddleware('/used',{
        target: 'http://8.140.108.21:3005',
        changeOrigin: true,
       
    }))
}